import java.util.Calendar;

enum AppointmentType {
	BUSINESS (5), 
	PERSONAL(1),
	MEDICAL(10);
	
	private final int importance;
	
	AppointmentType(int importance){
		this.importance= importance;
	}
	
	public int returnImportance(){
		return this.importance;
	}
}

public class Appointment {
	
	Calendar start;
	Calendar end;
	String description;
	AppointmentType type;
	
	public Appointment(Calendar start,Calendar end,String description) {
		this(start, end, description, AppointmentType.PERSONAL);		
	} 
	
	public Appointment(Calendar start, Calendar end, String description, AppointmentType type) {
		this.start = start;
		this.end = end;
		this.description = description;
		this.type = type;
	}

	public boolean overlaps(Appointment other) {
		return this.start.before(other.end) && this.end.after(other.start);
	}

	public boolean isBusiness() {
		if (type == null)
			return false;
		return type.equals(AppointmentType.BUSINESS);
	}

	public int returnImportance(Appointment appointment) {
		return this.type.returnImportance();
	}
}